import http from "@/utils/http";

/**
 * 首页-广告区域-小程序
 * @param {*} distributionSite 首页=1 分类页面=2
 */

export const getHomeBanner = (distributionSite = 1) => {
    return http({
        url:"/home/banner",
        data:{
            distributionSite,
        },
    });
};

/**
 * 首页-前台类目-小程序
 */
export const getHomeCategoryMutli = () => {
    return http({
        url: "/home/category/mutli",
    });
};

/**
 * 首页-热门推荐-小程序
 */
export const getHomeHotMutli = () => {
    return http({
        url: "/home/hot/mutli",
    });
};

/**
 * 首页-新鲜好物-小程序
 */
export const getHomeNew = () => {
    return http({
        url: "/home/new",
    });
};

/**
 * 猜你喜欢-小程序
 */
export const getHomeGoodsGuessLike = (data) => {
    return http({
        url: "/home/goods/guessLike",
        data,
    });
};

/**
 * 根据 首页的人气推荐模块需求，来返回
 * @param {String} url 请求的url
 * @param {Object} data 请求的数据
 */
export const getHomeRecommend = (url,data={}) => {
    return http({
        url,
        data,
    });
};